<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>堆叠</title>
		<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
		<script src="js/jquery-2.1.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<!--
			点击后有弹框效果
		-->
		<div class="container">
			<a class="btn btn-primary" data-toggle="collapse" href="#collapseExample">
				点击查看
			</a>
			<div class="collapse" id="collapseExample">
				<div class="well">
					Hello
				</div>
			</div>
			
			<!--
				data-parent：锁定父级控件
				手风琴效果
			-->
			<div class="panel-group" id="accordion" role="tablist">
				<div class="panel panel-default">
					<div class="panel-heading" role="tab" id="headingOne">
						<h4 class="panel-title">
							<a href="#collapseOne" data-toggle="collapse" 
								data-parent="#accordion">
								Item1
							</a>
						</h4>
					</div>                                      <!--折叠    展开-->
					<div id="collapseOne" class="panel-collapse collapse in" 
						role="tabpanel">
						<!--内容区域-->
						<div class="panel-body">
							Hello欢迎来到德玛西亚Hello欢迎来到德玛西亚
							Hello欢迎来到德玛西亚Hello欢迎来到德玛西亚
							Hello欢迎来到德玛西亚Hello欢迎来到德玛西亚
						</div>
					</div>
				</div>
				
				<div class="panel panel-default">
					<div class="panel-heading" role="tab" id="headingTwo">
						<h4 class="panel-title">
							<a href="#collapseTwo" data-toggle="collapse" 
								data-parent="#accordion">
								Item1
							</a>
						</h4>
					</div>                                      <!--折叠    -->
					<div id="collapseTwo" class="panel-collapse collapse " 
						role="tabpanel">
						<!--内容区域-->
						<div class="panel-body">
							Hello欢迎来到德玛西亚Hello欢迎来到德玛西亚
							Hello欢迎来到德玛西亚Hello欢迎来到德玛西亚
							Hello欢迎来到德玛西亚Hello欢迎来到德玛西亚
						</div>
					</div>
				</div>
				
				<div class="panel panel-default">
					<div class="panel-heading" role="tab" id="headingThree">
						<h4 class="panel-title">
							<a href="#collapseThree" data-toggle="collapse" 
								data-parent="#accordion">
								Item1
							</a>
						</h4>
					</div>                                      <!--折叠    展开-->
					<div id="collapseThree" class="panel-collapse collapse " 
						role="tabpanel">
						<!--内容区域-->
						<div class="panel-body">
							Hello欢迎来到德玛西亚Hello欢迎来到德玛西亚
							Hello欢迎来到德玛西亚Hello欢迎来到德玛西亚
							Hello欢迎来到德玛西亚Hello欢迎来到德玛西亚
						</div>
					</div>
				</div>
				
				
			</div>
		</div>
		
		<script>
			$("#accordion").on("hidden.bs.collapse",function(){
				alert("hello");//隐藏时弹出	
			})
		</script>
	</body>
</html>
